package test.abc;

import test.exam.Point;

public class Circle {


    public Circle() {
    }

    private Point center;

    private double radius;


    public void setCenter(Point center) {
        System.out.println("圆心坐标为:x=" + center.getX() + "y=" + center.getY());
        this.center = center;
    }


    public double setRadius(Point point) {
        radius = center.distance(point);
        System.out.println("半径为:" + radius);
        return radius;
    }

    public double S(Point p1, Point p2) {
        double s = Math.PI * p1.distance(p2);
        System.out.println("面积为:" + s

        );
        return s;

    }


}
